
Vue.component2('a_1_0_1_2_0', {  
    template: `
        <div class="a_1_0_1_2_0_menu_bar" :key="refresh" :style="'width:'+data.width">
{{show_project_name}} EA999
        </div>
`,  
  data() {
      return {
        show_project_name:"",
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"60%",
        }
         
      };
  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //更改key 从而刷新整个组件
        _this.refresh=_this.refresh=="2"?"1":"2";
    }

    
      //查看当前目录数据
      //设置选项
      _this.data.set_project=function(obj){
        /*
        user_id:项目所有者id
        dir1_id:目录1id
        temp_id:项目id
        project_name:项目名称
        */
        let user_id=obj.user_id;
        let dir1_id=obj.dir1_id;
        let temp_id=obj.temp_id;
        let project_name=obj.project_name;
        _this.show_project_name=`${project_name}(${user_id}/${dir1_id}/${temp_id})`;
        _this.refresh_func();//刷新组件
       }
       
  }
} 
);

